package cn.fl.ass.service;

import java.util.List;

import cn.fl.ass.vo.AssTrailCarDVO;
import cn.fl.ass.vo.AssTrailCarHvVO;
import cmm.mid.core.framework.page.Pager;
import cn.cmm.base.framework.exception.BaseException;
import fl.ass.facade.condition.AssTrailCarDQueryCondition;

/**
 * @Description: 拖车信息明细表 客户端服务层接口
 * @Description: 持久层方法名称前缀：新增：insert* 删除：delete* 修改：update* 批量：batch* 查询对象：select* get* find* 查询集合：select*
 * @Description: 业务层方法名称前缀：新增：add* 删除：remove* 修改：modify* 查询对象：select* get* 批量：batch* 查询集合：search*
 */
public interface IAssTrailCarDService {
	
	/**
	 * 获取唯一对象
	 * @param id 主键
	 * @return 对象DTO
	 */
	public AssTrailCarDVO selectById(Long id)throws BaseException;
	
	/**
	 * 新增
	 * @param entity
	 * @return
	 */
    public Long add(AssTrailCarDVO entity) throws BaseException;

    /**
     * 删除
     * @param id
     * @return
     */
    public boolean removeById(Long id)throws BaseException;
    
    /**
     * 删除
     * @param ids
     * @return
     */
    public boolean removeByIds(List<Long> ids)throws BaseException;

    /**
     * 修改
     * @param entity
     * @return
     */
    public boolean modify(AssTrailCarDVO entity)throws BaseException;

    /**
     * 分页查询所有
     * @param page
     * @return
     */
    public Pager searchListPage(Pager page)throws BaseException;
    
    /**
	 * 获取拖车申请相关信息
	 * @param id 主键
	 * @return 对象DTO
	 */
	public List<AssTrailCarDVO> selectByPaySchId(List<Long> ids)throws BaseException;
	
	/**
	 * 根据表名获取主键
	 * @param tabNm
	 * @return
	 */
    public Long getPkId(String tabNm) throws BaseException;
    
    /**
     * 不分页查询拖车明细
     * @author JiLi
     * @param condition
     * @return
     */
    public List<AssTrailCarDVO> searchDetailList(AssTrailCarDQueryCondition condition)throws BaseException;
    
    /**
   	 * 获取拖车申请明细信息
   	 * @param id 主键
   	 * @return 对象DTO
   	 */
   	public List<AssTrailCarDVO> selectByDetailId(List<Long> ids)throws BaseException;
   	
   	/**
	 * 根据拖车明细主键获取拖车交接单信息
	 * @param detailId
	 * @return
	 */
	public AssTrailCarHvVO selectTransferInfoById(Long detailId)throws BaseException;

    /**
     * 校验当前是否换车
     * @param prjId
     * @param prjPrdDtlId
     * @return
     * @throws BaseException
     */
	public boolean checkCarIsChanging(Long prjId, Long prjPrdDtlId) throws BaseException;

}
